package com.license.presentation.identity;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.license.logic.implementation.UserImplementation;
import com.license.logic.pojo.User;

public class UserPresentation {
	
	private UserImplementation userImplementation;
	
	public UserPresentation() {
		userImplementation = new UserImplementation();
	}
	
	public User logIn(String userName,String password) throws IOException {
	
		User  user = userImplementation.logIn(userName,password);
				
		return user;
				
	}
	
	public  List<User> getUsers() throws IOException {
		List<User> users = new ArrayList<User>();
		users = userImplementation.getUsers();
		
		return users;
	}
	
	public void deleteUser(User user) throws IOException {
		userImplementation.deleteUser(user);
	}
	
	public void editUser(User user) throws IOException {
		  userImplementation.editUser(user);
	}
	
	public void insertUser(User user) throws IOException {
		userImplementation.insertUser(user);
	}
	
	public User selectUser(String userName) throws IOException{
		return userImplementation.selectUser(userName);
	}

}
